package io.nplus.modules.generator.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.nplus.common.utils.PageUtils;
import io.nplus.common.utils.Query;

import io.nplus.modules.generator.dao.DemoDao;
import io.nplus.modules.generator.entity.DemoEntity;
import io.nplus.modules.generator.service.DemoService;


@Service("demoService")
public class DemoServiceImpl extends ServiceImpl<DemoDao, DemoEntity> implements DemoService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<DemoEntity> page = this.selectPage(
                new Query<DemoEntity>(params).getPage(),
                new EntityWrapper<DemoEntity>()
        );

        return new PageUtils(page);
    }

}
